package ru.teleology.cubefs.api.reflection.list.array;

import ru.teleology.cubefs.api.reflection.list.List;

public class ArrayBase<T> extends List<T> {

	public ArrayBase(long handle, boolean weak) {
		super(handle, weak);
	}

	public ArrayBase(long handle) {
		super(handle);
	}
	
	public void Resize(int size) {
		Resize(getHandle(), size);
	}
	
	public void Remove(int start, int length) {
		Remove(getHandle(), start, length);
	}
	
	public void Insert(int idx, ArrayBase values, int start, int length) 
	{
		if (values != null) 
		{
			Insert(idx, values.getHandle(), start, length);
		}
		else {
			throw new NullPointerException("values argument must not be null");
		}
	}

	private static native void Resize(long me, int size);  
	private static native void Remove(long me, int start, int length);
	
	private static native void Insert(int idx, long values, int start, int length);
}
